<template>
  <div class="nav-test-page">
    <div class="test-container">
      <h2>不规则导航栏测试</h2>
      <NavPage @nav-change="handleNavChange" />
      <div class="current-nav">
        当前选中: {{ currentNav }}
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import NavPage from '@/components/navPage/index.vue'

const currentNav = ref('总览')

const handleNavChange = (index: number, item: any) => {
  currentNav.value = item.text
  console.log('导航切换:', index, item)
}
</script>

<style scoped lang="less">
.nav-test-page {
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, rgba(0, 20, 40, 0.9) 0%, rgba(0, 40, 80, 0.8) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.test-container {
  text-align: center;
}

h2 {
  color: #00d4ff;
  margin-bottom: 50px;
  font-size: 24px;
}

.current-nav {
  margin-top: 30px;
  font-size: 16px;
  color: #ffffff;
}
</style>